home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1998 March / Software of the Month Club 1998 March.iso / mac / Utilities / ZipIt / Goodies / macszip next >
Text File  |  1995-12-30  |  701b  |  34 lines

  1. #! /bin/sh
  2.  
  3. # Shell script to zip, MacBinarize, and ZMODEM download files.
  4. # Note: This is only useful if you have a Unix shell account. It is used
  5. # to zip files that you want to send from your Unix account to your Mac.
  6. # Requires that mcvert be installed.
  7.  
  8. if [ $# -lt 1 ]; then
  9.     echo
  10.     echo 'Usage: macszip directory|filename...'
  11.     echo
  12.     exit 1
  13. fi
  14.  
  15. td=tmp/`basename $0`.$USER.$$
  16. mkdir /$td
  17. fn=`basename $1`
  18. zip -r /$td/$fn.zip "$@"
  19. cd /$td
  20. mv $fn.zip $fn.zip.data
  21.  
  22. MAC_EDITOR='ZIP '
  23. MAC_FILETYPE='ZIP '
  24. MAC_DLOAD_DIR=.
  25. MAC_EXT=.bin
  26. export MAC_EDITOR MAC_FILETYPE MAC_DLOAD_DIR MAC_EXT
  27.  
  28. mcvert -Dd $fn.zip && sz -b -l 1024 $fn.zip.bin
  29. sendrc=$?
  30.  
  31. cd ..
  32. rm -r /$td || sendrc=$?
  33. exit $sendrc
  34.